const moment = require("moment");

function formatTime(value, pattern = 'YYYY-MM-DD HH:mm') {
    value = new Date(value);
    return !value ? '' : moment(value).format(pattern);
}

function formatDate(value, pattern = 'YYYY-MM-DD') {
    value = new Date(value);
    return !value ? '' : moment(value).format(pattern)
}


export {
    formatTime,
    formatDate,
};